<?php
namespace app\api\validate;

use think\Validate;

class TechnValidate extends Validate{
    protected $rule =   [
        'id'            => 'require|number',
        'user_id'       => 'require|number',
        'goods_id'      => 'require|number',
        'techn_id'      => 'require|number',
        'curr'          => 'require|number',
        'limit'         => 'require|number',
    ];
    
    protected $message  =   [
        'id.require'            => 'ID必须',
        'id.number'             => 'ID必须是数字',
        'user_id.require'       => '用户ID必须',
        'user_id.number'        => '用户ID数据类型错误',
        'goods_id.require'      => '商品ID必须',
        'goods_id.number'       => '商品ID数据类型错误',
        'techn_id.require'      => '技师ID必须',
        'techn_id.number'       => '技师ID数据类型错误',
        'curr.require'          => '页数必须',
        'curr.number'           => '页数数据类型错误',
        'limit.require'         => '条数必须',
        'limit.number'          => '条数数据类型错误',
    ];
    
    protected $scene = [
        'list'        => ['goods_id', 'curr', 'limit'],
        'show'        => ['techn_id'],
    ];
}